//跳转对象申明
//
let exit = document.querySelector('.z-left');
let shouSuo = document.querySelector('.glyphicon-search');
let oExit = document.querySelector('.glyphicon-off');
let yongHu = document.querySelector('.yonghu');
let zljshouye = document.querySelector(".zljshouye");
//更换头像
let ofile = document.querySelector('#file');
let showImg = document.querySelector('.show-img');
showImg.addEventListener('click',function(){
    ofile.click();
    ofile.addEventListener('change', function () {
        //文件阅读对象
        let fileReader = new FileReader()
        //fileReader.readAsDataURL    转成数据地址（bese64地址）
        fileReader.readAsDataURL(ofile.files[0]);
        fileReader.addEventListener('loadend',function(e){
            showImg.src=e.target.result;
     })
    })
});
//点击返回上一页
exit.addEventListener('click', function () {
    window.history.back()
})
//退出登陆的功能
oExit.addEventListener('click', function () {
    window.location.href = '../pages/login.html';
})
//点击搜索框  搜索导航栏题目就跳转到哪个页面
//点击用户
yongHu.addEventListener('click', function () {
        window.location.href = "../pages/per_message.html";
})

zljshouye.addEventListener('click', function () {
      if(event.target.className.includes('zlj-shouye1')){
        window.location.href = "home.html";
      }
      if (event.target.className.includes("zlj-shouye21")) {
        window.location.href = "ly_examinationPaperClassification.html";
      }
      if (event.target.className.includes("zlj-shouye22")) {
        window.location.href = "ly-questionList.html";
      }
      if (event.target.className.includes("zlj-shouye31")) {
        window.location.href = "paperclassification.html";
      }
      if (event.target.className.includes("zlj-shouye32")) {
        window.location.href = "papermanage.html";
      }
      if (event.target.className.includes("zlj-shouye41")) {
        window.location.href = "Examination.html";
      }
      if (event.target.className.includes("zlj-shouye42")) {
        window.location.href = "Examination2.html";
      }
      if (event.target.className.includes("zlj-shouye43")) {
        window.location.href = "Examination3.html";
      }
      if (event.target.className.includes("zlj-shouye44")) {
        window.location.href = "Examination4.html";
      }
      if (event.target.className.includes("zlj-shouye51")) {
        window.location.href = "kaoshiguanli.html";
      }
      if (event.target.className.includes("zlj-shouye52")) {
        window.location.href = "kaoshixiangqing.html";
      }
      if (event.target.className.includes("zlj-shouye53")) {
        window.location.href = "xingzengkaoshi.html";
      }
      if (event.target.className.includes("zlj-shouye61")) {
        window.location.href = "Candidate-management.html";
      }
      if (event.target.className.includes("zlj-shouye71")) {
        window.location.href = "statistic-analysis.html";
      }
      if (event.target.className.includes("zlj-shouye72")) {
        window.location.href = "statistic-analysis2.html";
      }
      if (event.target.className.includes("zlj-shouye81")) {
        window.location.href = "reward.html";
      }
      if (event.target.className.includes("zlj-shouye91")) {
        window.location.href = "system-figure.html";
      }
      if (event.target.className.includes("zlj-shouye92")) {
        window.location.href = "system-message.html";
      }
      if (event.target.className.includes("zlj-shouye93")) {
        window.location.href = "system-safe.html";
      }
      if (event.target.className.includes("zlj-shouye94")) {
        window.location.href = "system-daily.html";
      }
})















// aAll[1].addEventListener('click', function () {
//     window.location.href = "../pages/ly_examinationPaperClassification.html"

// })
// aAll[2].addEventListener('click', function () {
//       window.location.href = "home.html";

// })
// aAll[3].addEventListener('click', function () {
//     window.location.href = "../pages/Examination.html"
// })
// aAll[4].addEventListener('click', function () {
//     window.location.href = "../pages/Examination.html";

// })
// aAll[5].addEventListener('click', function () {
//     window.location.href = "home.html"

// })
// aAll[6].addEventListener('click', function () {
//     window.location.href = "../pages/statistic analysis.html"

// })
// aAll[7].addEventListener('click', function () {
//     window.location.href = "../pages/reward.html"

// })
// aAll[8].addEventListener('click', function () {
//       window.location.href = "../pages/system-daily.html";
// })